package org.feng.exception;

import lombok.Getter;
import org.feng.base.enums.ErrorCode;

/**
 * @Author feng
 * @Date 2022/6/7 15:38
 * @Description 业务异常
 */
@Getter
public class ServiceException extends RuntimeException {

    private final Integer code;

    public ServiceException(ErrorCode errorCode) {
        super(errorCode.getMsg());
        this.code = errorCode.getCode();
    }
}
